@font-face {
  font-family: 'ClassicalChinese';
  src: url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap');
}

.role-select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-top: 8px;
}

.login-container {
  width: 100%;
  min-height: 100vh;
  background-image: url('../img/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  box-sizing: border-box;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  overflow: auto;
}

/* 导航栏样式 */
.nav-bar {
  width: 100%;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-item {
  font-family: 'ClassicalChinese', 'Ma Shan Zheng', serif;
  font-size: 1.2rem;
  color: #8B4513;
  cursor: pointer;
  transition: color 0.3s;
}

.nav-item:hover {
  color: #5D4037;
  text-decoration: underline;
}

.user-section {
  position: relative;
}

.user-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid #8B4513;
  background-color: #f0e6d2;
  transition: transform 0.2s, box-shadow 0.2s;
}

.user-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px rgba(139, 69, 19, 0.6);
}

.user-avatar:active {
  transform: scale(0.95);
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0.8rem;
  color: #8B4513;
  font-weight: bold;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  background-color: white;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  padding: 10px;
  z-index: 1000;
  min-width: 100px;
  animation: dropdownFadeIn 0.2s;
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-dropdown button {
  background-color: #8B4513;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'ClassicalChinese', 'Ma Shan Zheng', serif;
  width: 100%;
  white-space: nowrap;
}

.login-dropdown button:hover {
  background-color: #6D351A;
}

.content {
  width: 90%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
}

/* 登录面板样式 */
.login-panel {
  width: 100%;
  max-width: 450px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
  padding: 40px;
  margin: 20px 0;
}

.login-title {
  font-family: 'ClassicalChinese', 'Ma Shan Zheng', serif;
  font-size: 2rem;
  color: #8B4513;
  text-align: center;
  margin-bottom: 30px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-family: 'ClassicalChinese', 'Ma Shan Zheng', serif;
  font-size: 1.1rem;
  color: #5D4037;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #d1c4b0;
  border-radius: 5px;
  font-size: 1rem;
  color: #333;
  background-color: rgba(255, 255, 255, 0.8);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #8B4513;
  box-shadow: 0 0 5px rgba(139, 69, 19, 0.3);
}

.verification-input-group {
  display: flex;
  gap: 10px;
}

.verification-input-group input {
  flex: 1;
}

.verification-code {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 100px;
  height: 45px;
  background-color: #f0e6d2;
  border: 1px solid #d1c4b0;
  border-radius: 5px;
  font-family: 'Courier New', monospace;
  font-size: 1.2rem;
  font-weight: bold;
  color: #8B4513;
  cursor: pointer;
  user-select: none;
  letter-spacing: 2px;
}

.verification-code:hover {
  background-color: #e6d8c0;
}

.error-message {
  color: #d9534f;
  font-size: 0.9rem;
  margin-bottom: 15px;
  text-align: center;
}

.login-btn {
  width: 100%;
  padding: 12px;
  background-color: #8B4513;
  color: white;
  border: none;
  border-radius: 5px;
  font-family: 'ClassicalChinese', 'Ma Shan Zheng', serif;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

.login-btn:hover {
  background-color: #6D351A;
  transform: translateY(-2px);
}

.login-btn:active {
  transform: translateY(0);
}

.login-footer {
  margin-top: 25px;
  text-align: center;
  font-size: 0.85rem;
  color: #666;
}

.login-footer a {
  color: #8B4513;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* 登录提示弹窗 */
.login-alert {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 1000;
  animation: alertFadeIn 0.3s;
}

@keyframes alertFadeIn {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.alert-content {
  text-align: center;
}

/* 功能提示小弹窗样式 */
.feature-prompt-mini {
  position: absolute;
  z-index: 1000;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 220px;
  animation: popIn 0.2s ease-out;
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.prompt-arrow {
  position: absolute;
  top: -8px;
  left: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid white;
}

.prompt-content {
  padding: 15px;
}

.prompt-content p {
  margin: 0 0 12px 0;
  font-family: 'ClassicalChinese', 'Ma Shan Zheng', serif;
  font-size: 1rem;
  color: #5D4037;
  text-align: center;
}

.prompt-buttons {
  display: flex;
  justify-content: space-between;
}

.prompt-buttons button {
  padding: 6px 12px;
  border-radius: 4px;
  font-family: 'ClassicalChinese', 'Ma Shan Zheng', serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.prompt-buttons .cancel-btn {
  background-color: #f0e6d2;
  color: #8B4513;
  border: 1px solid #d1c4b0;
}

.prompt-buttons .cancel-btn:hover {
  background-color: #e6d8c0;
}

.prompt-buttons .login-btn {
  background-color: #8B4513;
  color: white;
  border: none;
}

.prompt-buttons .login-btn:hover {
  background-color: #6D351A;
}